package util.designpattern.AdapterPattern;

public class PowerAdapter implements AC5 {
    private AC220 ac220;
    public PowerAdapter(AC220 ac220){
        this.ac220 = ac220;
    }

    @Override
    public int outPutAC5V() {

        int out = ac220.outPutAC220V();
        //变压
        int adapterOut = out/44;
        System.out.println("输入电压" + out + "V,成功转换为：" + adapterOut + "V" );
        return adapterOut;
    }
}
